$def with(post)

<!-- 正如你所见，edit.html与add.html中的HTML元素完全一致，以便edit.html能够共享add.html对应的JS效果 -->

<form id="new_post" action="" method="post">
<table>
<tbody>
    <tr>
        <td><label for="title">标题</label></td>
        <td>
            <input type="text" id="title" name="title" style="width:800px" value="$post['title']" /><br />
            <span id="for_title" class="validate_tip"></span>
        </td>
    </tr>
    <tr>
        <td><label for="content">内容</label></td>
        <td>
            <section id="page-demo">
            <textarea id="content" name="content" data-autosave="editor-content" autofocus>$post['content']</textarea></section>
            <br />        
            <span id="for_content" class="validate_tip"></span>
        </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td><input type="submit" id="send_btn" value="发帖" /></td>
        <td><span class="submit_tip"></span></td>
    </tr>
</tbody>
</table>
<script type="text/javascript">
    /*(function() {
      jQuery(function() {
        var editor, toolbar;
        toolbar = ['title', 'bold', 'italic', 'underline', 'strikethrough', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'];
        
        return editor = new Simditor({
          textarea: jQuery('#content'),
          placeholder: '这里输入文字...',
          toolbar: toolbar,
          pasteImage: true,
          defaultImage: '/static/img/image.png',
          upload: location.search === '?upload' ? {
            url: '/upload'
          } : false
        });
      });
    }).call(this);
    */
    jQuery(function(){
        var editor, toolbar;
        toolbar = ['ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'markdown'];
        
        var editor = new Simditor({
            textarea: jQuery('#content'),
            markdown: true,
            toolbar: toolbar
        });
    });
</script>
</form>

